package com.itheima.d7_interface_demo;


import java.util.ArrayList;

public class StudentManager {
     ArrayList<Student> stu = new ArrayList<>();
     //多态，接口类引用实现的的对象
    StudentOperator impl1 = new StudentOperatorImpl1();

    public StudentManager() {
        stu.add(new Student("貂蝉",'女',60.0));
        stu.add(new Student("阿米娅",'女',56.0));
        stu.add(new Student("特蕾西亚",'女',89.0));
        stu.add(new Student("凯尔希",'女',100.0));
    }
    public void printAll(){
        //打印学生信息

        impl1.printAllInfo(stu);
    }
    public void  printAvgScore(){
        //打印学生成绩

        impl1.printAvgScore(stu);
    }

}
